-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zebra: Uninstall NHG in some situations #17814
zebra: Uninstall NHG in some situations #17814
Conversation
If you have this series of events: a) Decision to install a NHG is made in zebra, enqueue to DPLANE b) Changes to NHG are made and we remove it in the master pthread Since this NHG is not marked as installed it is not removed but the NHG data structure is deleted c) DPLANE installs the NHG In the end the NHG stays installed but ZEBRA has lost track of it. Modify the removal code to check to see if the NHG is queued. There are 2 cases: a) NHG is kept around for a bit before being deleted. In this case just see that the NHG is Queued and keep it around too. b) NHG is not kept around and we are just removing it. In this case check to see if it is queued and send another deletion event. Signed-off-by: Donald Sharp <[email protected]>
ba9c0ef
to
4c16694
Compare
As part of this commit, does it make sense to convert https://github.com/FRRouting/frr/blob/master/zebra/zebra_nhg.c#L3437 as a zlog_warn/error?
|
I don't see much point what do we expect the operator to do in this case? |
ci:rerun |
* main pthread ). | ||
*/ | ||
if (CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_INSTALLED) || | ||
CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_QUEUED)) { | ||
int ret = dplane_nexthop_delete(nhe); | ||
|
||
switch (ret) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flag 'NEXTHOP_GROUP_QUEUED' at line 3401 may be unnecessary in the delete scenario. Should we remove the behavior of setting this flag to avoid confusion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, there is no need to put in a special case here for deletion on Queued. Let's keep the code as simple as possible here.
If you have this series of events:
a) Decision to install a NHG is made in zebra, enqueue to DPLANE b) Changes to NHG are made and we remove it in the master pthread
Since this NHG is not marked as installed it is not removed
but the NHG data structure is deleted
c) DPLANE installs the NHG
In the end the NHG stays installed but ZEBRA has lost track of it.
Modify the removal code to check to see if the NHG is queued. There are 2 cases:
a) NHG is kept around for a bit before being deleted. In this case just see that the NHG is Queued and keep it around too.
b) NHG is not kept around and we are just removing it. In this case check to see if it is queued and send another deletion event.